Optimal. Leaf size=211 \[ -\frac {8 b d f n}{9 x}-\frac {2}{9} b d^{3/2} f^{3/2} n \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right )-\frac {2 d f \left (a+b \log \left (c x^n\right )\right )}{3 x}-\frac {2}{3} d^{3/2} f^{3/2} \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right ) \left (a+b \log \left (c x^n\right )\right )-\frac {b n \log \left (1+d f x^2\right )}{9 x^3}-\frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{3 x^3}+\frac {1}{3} i b d^{3/2} f^{3/2} n \text {Li}_2\left (-i \sqrt {d} \sqrt {f} x\right )-\frac {1}{3} i b d^{3/2} f^{3/2} n \text {Li}_2\left (i \sqrt {d} \sqrt {f} x\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.10, antiderivative size = 211, normalized size of antiderivative = 1.00, number of steps
used = 8, number of rules used = 7, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.269, Rules used = {2505, 331, 211,
2423, 4940, 2438, 209} \begin {gather*} \frac {1}{3} i b d^{3/2} f^{3/2} n \text {PolyLog}\left (2,-i \sqrt {d} \sqrt {f} x\right )-\frac {1}{3} i b d^{3/2} f^{3/2} n \text {PolyLog}\left (2,i \sqrt {d} \sqrt {f} x\right )-\frac {2}{3} d^{3/2} f^{3/2} \text {ArcTan}\left (\sqrt {d} \sqrt {f} x\right ) \left (a+b \log \left (c x^n\right )\right )-\frac {2 d f \left (a+b \log \left (c x^n\right )\right )}{3 x}-\frac {\log \left (d f x^2+1\right ) \left (a+b \log \left (c x^n\right )\right )}{3 x^3}-\frac {2}{9} b d^{3/2} f^{3/2} n \text {ArcTan}\left (\sqrt {d} \sqrt {f} x\right )-\frac {b n \log \left (d f x^2+1\right )}{9 x^3}-\frac {8 b d f n}{9 x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 209
Rule 211
Rule 331
Rule 2423
Rule 2438
Rule 2505
Rule 4940
Rubi steps
\begin {align*} \int \frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (d \left (\frac {1}{d}+f x^2\right )\right )}{x^4} \, dx &=-\frac {2 d f \left (a+b \log \left (c x^n\right )\right )}{3 x}-\frac {2}{3} d^{3/2} f^{3/2} \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right ) \left (a+b \log \left (c x^n\right )\right )-\frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{3 x^3}-(b n) \int \left (-\frac {2 d f}{3 x^2}-\frac {2 d^{3/2} f^{3/2} \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right )}{3 x}-\frac {\log \left (1+d f x^2\right )}{3 x^4}\right ) \, dx\\ &=-\frac {2 b d f n}{3 x}-\frac {2 d f \left (a+b \log \left (c x^n\right )\right )}{3 x}-\frac {2}{3} d^{3/2} f^{3/2} \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right ) \left (a+b \log \left (c x^n\right )\right )-\frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{3 x^3}+\frac {1}{3} (b n) \int \frac {\log \left (1+d f x^2\right )}{x^4} \, dx+\frac {1}{3} \left (2 b d^{3/2} f^{3/2} n\right ) \int \frac {\tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right )}{x} \, dx\\ &=-\frac {2 b d f n}{3 x}-\frac {2 d f \left (a+b \log \left (c x^n\right )\right )}{3 x}-\frac {2}{3} d^{3/2} f^{3/2} \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right ) \left (a+b \log \left (c x^n\right )\right )-\frac {b n \log \left (1+d f x^2\right )}{9 x^3}-\frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{3 x^3}+\frac {1}{9} (2 b d f n) \int \frac {1}{x^2 \left (1+d f x^2\right )} \, dx+\frac {1}{3} \left (i b d^{3/2} f^{3/2} n\right ) \int \frac {\log \left (1-i \sqrt {d} \sqrt {f} x\right )}{x} \, dx-\frac {1}{3} \left (i b d^{3/2} f^{3/2} n\right ) \int \frac {\log \left (1+i \sqrt {d} \sqrt {f} x\right )}{x} \, dx\\ &=-\frac {8 b d f n}{9 x}-\frac {2 d f \left (a+b \log \left (c x^n\right )\right )}{3 x}-\frac {2}{3} d^{3/2} f^{3/2} \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right ) \left (a+b \log \left (c x^n\right )\right )-\frac {b n \log \left (1+d f x^2\right )}{9 x^3}-\frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{3 x^3}+\frac {1}{3} i b d^{3/2} f^{3/2} n \text {Li}_2\left (-i \sqrt {d} \sqrt {f} x\right )-\frac {1}{3} i b d^{3/2} f^{3/2} n \text {Li}_2\left (i \sqrt {d} \sqrt {f} x\right )-\frac {1}{9} \left (2 b d^2 f^2 n\right ) \int \frac {1}{1+d f x^2} \, dx\\ &=-\frac {8 b d f n}{9 x}-\frac {2}{9} b d^{3/2} f^{3/2} n \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right )-\frac {2 d f \left (a+b \log \left (c x^n\right )\right )}{3 x}-\frac {2}{3} d^{3/2} f^{3/2} \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right ) \left (a+b \log \left (c x^n\right )\right )-\frac {b n \log \left (1+d f x^2\right )}{9 x^3}-\frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{3 x^3}+\frac {1}{3} i b d^{3/2} f^{3/2} n \text {Li}_2\left (-i \sqrt {d} \sqrt {f} x\right )-\frac {1}{3} i b d^{3/2} f^{3/2} n \text {Li}_2\left (i \sqrt {d} \sqrt {f} x\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains higher order function than in optimal. Order 5 vs. order 4 in
optimal.
time = 0.13, size = 285, normalized size = 1.35 \begin {gather*} -\frac {2 a d f \, _2F_1\left (-\frac {1}{2},1;\frac {1}{2};-d f x^2\right )}{3 x}-\frac {2}{9} b d^{3/2} f^{3/2} \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right ) \left (n+3 \left (-n \log (x)+\log \left (c x^n\right )\right )\right )-\frac {2 b \left (d f n+3 d f \left (-n \log (x)+\log \left (c x^n\right )\right )\right )}{9 x}-\frac {a \log \left (1+d f x^2\right )}{3 x^3}-\frac {b \left (n+3 n \log (x)+3 \left (-n \log (x)+\log \left (c x^n\right )\right )\right ) \log \left (1+d f x^2\right )}{9 x^3}+\frac {2}{3} b d f n \left (-\frac {1}{x}-\frac {\log (x)}{x}+\frac {1}{2} i \sqrt {d} \sqrt {f} \left (\log (x) \log \left (1+i \sqrt {d} \sqrt {f} x\right )+\text {Li}_2\left (-i \sqrt {d} \sqrt {f} x\right )\right )-\frac {1}{2} i \sqrt {d} \sqrt {f} \left (\log (x) \log \left (1-i \sqrt {d} \sqrt {f} x\right )+\text {Li}_2\left (i \sqrt {d} \sqrt {f} x\right )\right )\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 0.15, size = 734, normalized size = 3.48
method | result | size |
risch | \(-\frac {\ln \left (d f \,x^{2}+1\right ) a}{3 x^{3}}+\frac {b n d f \sqrt {-d f}\, \dilog \left (1+x \sqrt {-d f}\right )}{3}-\frac {b n d f \sqrt {-d f}\, \dilog \left (1-x \sqrt {-d f}\right )}{3}+\frac {i b \pi \mathrm {csgn}\left (i c \,x^{n}\right )^{3} d f}{3 x}+\frac {2 b \,d^{2} f^{2} \arctan \left (\frac {x d f}{\sqrt {d f}}\right ) n \ln \left (x \right )}{3 \sqrt {d f}}+\frac {b n d f \sqrt {-d f}\, \ln \left (x \right ) \ln \left (1+x \sqrt {-d f}\right )}{3}-\frac {b n d f \sqrt {-d f}\, \ln \left (x \right ) \ln \left (1-x \sqrt {-d f}\right )}{3}+\frac {i b \pi \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right ) \ln \left (d f \,x^{2}+1\right )}{6 x^{3}}-\frac {i b \pi \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} d f}{3 x}-\frac {i b \pi \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} d f}{3 x}-\frac {2 a \,d^{2} f^{2} \arctan \left (\frac {x d f}{\sqrt {d f}}\right )}{3 \sqrt {d f}}-\frac {2 a d f}{3 x}-\frac {i b \pi \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} \ln \left (d f \,x^{2}+1\right )}{6 x^{3}}-\frac {b \ln \left (c \right ) \ln \left (d f \,x^{2}+1\right )}{3 x^{3}}-\frac {i b \pi \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} \ln \left (d f \,x^{2}+1\right )}{6 x^{3}}+\frac {i b \pi \mathrm {csgn}\left (i c \,x^{n}\right )^{3} d^{2} f^{2} \arctan \left (\frac {x d f}{\sqrt {d f}}\right )}{3 \sqrt {d f}}-\frac {2 b \ln \left (c \right ) d f}{3 x}-\frac {b \ln \left (d f \,x^{2}+1\right ) \ln \left (x^{n}\right )}{3 x^{3}}-\frac {2 b d f \ln \left (x^{n}\right )}{3 x}+\frac {i b \pi \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right ) d^{2} f^{2} \arctan \left (\frac {x d f}{\sqrt {d f}}\right )}{3 \sqrt {d f}}-\frac {i b \pi \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} d^{2} f^{2} \arctan \left (\frac {x d f}{\sqrt {d f}}\right )}{3 \sqrt {d f}}+\frac {i b \pi \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right ) d f}{3 x}-\frac {b n \ln \left (d f \,x^{2}+1\right )}{9 x^{3}}-\frac {2 b n \,d^{2} f^{2} \arctan \left (\frac {x d f}{\sqrt {d f}}\right )}{9 \sqrt {d f}}-\frac {i b \pi \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} d^{2} f^{2} \arctan \left (\frac {x d f}{\sqrt {d f}}\right )}{3 \sqrt {d f}}+\frac {i b \pi \mathrm {csgn}\left (i c \,x^{n}\right )^{3} \ln \left (d f \,x^{2}+1\right )}{6 x^{3}}-\frac {2 b \ln \left (c \right ) d^{2} f^{2} \arctan \left (\frac {x d f}{\sqrt {d f}}\right )}{3 \sqrt {d f}}-\frac {8 b d f n}{9 x}-\frac {2 b \,d^{2} f^{2} \arctan \left (\frac {x d f}{\sqrt {d f}}\right ) \ln \left (x^{n}\right )}{3 \sqrt {d f}}\) | \(734\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {\ln \left (d\,\left (f\,x^2+\frac {1}{d}\right )\right )\,\left (a+b\,\ln \left (c\,x^n\right )\right )}{x^4} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________